<?
$categories=ORM::factory('category')->find_all();
$medias=ORM::factory('media')->find_all();
echo '<div class="media_container">';

foreach($categories as $category){
	echo $category->title;
}	

foreach($medias as $media){
	echo '<div class="media_elm">';
	//$url=$media->get_resized_url(30,30);
	$img=html::anchor('#',html::image(array('src'=>$url)));
	echo $img;
	echo '</div>';		
}
echo '<div class="clear"></div>';
echo '</div>';

?>